import { App } from 'antd';

/**
 * 获取Antd App组件的message实例
 * 用于替代静态message方法，避免上下文警告
 */
export const useMessage = () => {
  const { message } = App.useApp();
  return message;
};

/**
 * 获取Antd App组件的所有实例
 */
export const useAntdApp = () => {
  return App.useApp();
};